import pandas as pd

df = pd.DataFrame({
   'A': [1, 2, 2],
   'B': ['x', 'y', 'y']
})

no_dup_df = df.drop_duplicates(subset=['A','B'], keep='first')